package cate.game.play.proce.play;

import cp.solution.util.collection.ListKit;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@NoteClass(value = "剧本故事",detail = "不同模块中下列字段的意义不一样")
public class PlayStory {

    @NoteField("功能id")
    public int funcId;

    @NoteField("细分类型")
    public int subType;

    @NoteField("关卡")
    public int level;

    @NoteField("场次数")
    public int playIndex;

    @NoteField(value = "最大场次数",detail = "")
    public int playMax;

    @NoteField("之前几场的胜者")
    public List<Byte> preWinner = new ArrayList<>();

    @NoteField("自定义参数")
    public Map<String,Object> params = new HashMap<>();

    public PlayStory copy() {
        PlayStory story = new PlayStory();
        story.funcId = this.funcId;
        story.subType = this.subType;
        story.level = this.level;
        story.playIndex = this.playIndex;
        story.playMax = this.playMax;
        story.params = this.params;
        story.preWinner = ListKit.cloneList(preWinner, Byte::byteValue);
        return story;
    }
}
